home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
026-050
/
scopedisk27
/
postcard1.0
/
postcard.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
5KB
|
122 lines
PostCard - a Mini-HyperText
Version 1.0
04/15/88
by Tim Holloway
Here's a neat little toy, and a useful one, too. PostCard is my (initial)
answer to Apple's HyperCard [tm] system for the Amiga. I call it PostCard
because of its most obvious limitation - it operates only on single "cards" -
it doesn't support stacks. Still, it's suprising what you can do within
that limit, and eventually I expect to see it removed.
Basically, here's how it works. You build one or more cards, using
an offline program named MakeCard. Not as nice as interactive design,
but it was a lot quicker to write. Something else to address later.
Then execute PostCard. PostCard creates a private screen containing the
background image. Overlaying the background are one or more Gadgets.
Presently that means text strings. With each text string gadget an
action can be associated. When you click on that string, the displayed
screen is removed and the action is taken. That's pretty much it - the
power lies in its simplicity.
Creating a PostCard:
Each PostCard is an IFF-format file. It is not compatible with a HyperCard
stack file. The card is defined by a special form: HYP0, or HYPR,
which contains an ILBM image of the background and additional chunks that
define the PostCard characteristics. Any valid ILBM picture can be used -
sorry, I don't support HAM mode.
The MakeCard program takes input from the standard input stream and
creates a file with the supplied name:
MakeCard <statements Mycard
if the statements are in a file named "statements" and you wish to create
a PostCard named Mycard. MakeCard doesn't create icons, so you must
duplicate the sample one (mlsdata.info)
The first statement must always define the background image:
BG Myimage.pic
The background image is taken from the indicated file (Myimage.pic),
which is an IFF ILBM file, such as created by Deluxe Paint, etc.
Now define some fonts. They will be used to render the caption text.
font fontname pointsize attribs
For example: font ruby.font 12 0
'attribs' are as defined in the Rom Kernel Manual, and indicate such
options as italics, boldface, etc. Specify attribs as a DECIMAL number!
After all the fonts have been defined, you can define captions. Captions
are string definitions that become Boolean Gadgets on the screen. The
specification is as follows:
capt left top font color,text
left and top are the coordinates of the upper left corner of the caption.
Font is the font number - the first "font" statement defines font 1, the
second defines font 2, etc. Color is the color number to use. Adding
100 to the color indicates the the text will be rendered in JAM2 mode,
otherwise JAM1 will be used. JAM2 causes the text to be rendered on a
rectangle of the background color (color 0). The text is the caption itself.
Following each caption should be an action. An Action may be an AmigaDOS
command. In this case, the command is executed and the postcard is then
redisplayed. The special command "Jump" causes a different card to
be displayed. The special command "Quit" causes the PostCard program
to terminate. A typical caption might look like this:
action Copy Aspirin.help to PRT:
Now, let's put them all together:
BG MedicineCabinet.pic
Font Ruby.font 12,0
Font Ruby.font 15,0
capt 20,20,1,1,Aspirin
action Copy Aspirin.help to PRT:
capt 100,20,1,1,Antihistamine
action Copy Antihistimine.help to PRT:
capt 40,20,1,1,Iodine
action Copy Iodine.help to PRT:
end
That's it.
Using PostCard:
Postcard may be run either from the CLI or the WorkBench (if an icon
is provided for the card). From CLI, simply say:
PostCard filename
Unlike most WorkBench programs, I presently don't support multiple project
selection. It didn't seem to make sense to do so. Maybe I'm wrong (?).
Distribution:
While I generally prefer to give my software away (all that fun and get PAID
for it, too?), the people at the grocery store has a somewhat less
enlightened attitude. If you like this program, send me $25. It'll keep
me from starving to death while I come up with improvements. The more
responses I get, the more incentive I have to improve it - if you're not
interested in it, I won't be either. The details can be found by pressing
the HELP key.
The programs and documentation contained herein are copyrighted materials.
They may be freely distributed as long as the copyright notices are intact,
all pertinent components remain together and the package is distributed
on a non-profit basis (i.e. no attempt is made to charge for more than the
cost of copying and no attempts are made to hinder distribution). My
apologies for the quality of the sample artwork. Obviously, my talents lie
in other directions!